<!doctype html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title><?= (isset($site_name) ? Html::chars($site_name) : '') ?> | <?= (isset($page_title) ? Html::chars($page_title) : '') ?></title>
        <meta name="keywords" content="<?= (isset($keywords) ? $keywords : '') ?>" />
        <meta name="description" content="<?= (isset($description) ? $description : '') ?>" />
        <meta name="robots" content="index, follow" />

        <link rel="icon" href="/favicon.png" type="image/png"/>

        <?php foreach ($styles as $file_style) : ?>
            <?= html::style($file_style) ?>
        <?php endforeach; ?>   

        <?php foreach ($scripts as $file_script) : ?>
            <?= html::script($file_script) ?>
        <?php endforeach; ?>   
    </head>
    <body>
        <div id="site">
            <div id="header">
                <img  height="130" style="float: left;" src="/media/images/sitelogo.png"/>
                <h1><?= $site_name; ?></h1>
                <?= $site_description; ?>

                <?php if (isset($top_menu)) : ?>
                    <div class="header_menu">
                        <?= $top_menu; ?>                        
                    </div>                
                <?php endif; ?>                
                <div class="cart-wrap">
                    <?php echo HTML::anchor('cart', '<img src="/images/cart.png" width="40"/>'); ?>
                </div>
            </div>
            <?php if (isset($block_left)) : ?>
                <div id="left_column">
                    <?php foreach ($block_left as $bl) : ?>
                        <?= $bl; ?>
                    <?php endforeach; ?>                    
                </div>
            <?php endif; ?>

            <?php if (isset($block_center)) : ?>
                <div id="content" <?php if (!isset($block_right)) {
                echo 'style="width: 758px;"';
            } ?>>                    
                    <?php foreach ($block_center as $bc) : ?>
                    <?= $bc; ?>                    
                <?php endforeach; ?> 
                </div>
            <?php endif; ?>


                <?php if (isset($block_right)) : ?>
                <div id="right_column">                                         
                    <?php foreach ($block_right as $br) : ?>
                    <?= $br; ?>
                <?php endforeach; ?>                    
                </div>
<?php endif; ?>
            <div id="footer">
                <?php echo HTML::anchor('admin', 'Admin panel'); ?>
            </div>
        </div>
    </body>
</html>